#include "pdeDoseEngine.h"

using namespace pde;

void main() {
    std::string path1("f:\\proton_dose_models\\test1\\");
	auto lut = Lut::New();
    auto plan = Plan::New();
    auto ct = VolumeShort::New();
    auto nozzle = Nozzle::New();
    auto roi_1 = Roi::New();
    auto roi_2 = Roi::New();


    plan->from_file(path1 + "plan.bson");
    lut->from_file(path1+"lut.bson");
    ct->load_volume(path1 + "ct.mhd");
    nozzle->from_file(path1 + "nozzle.bson");

    roi_1->from_file(path1 + "roi_1.mhd");
    roi_2->from_file(path1 + "roi_2.mhd");

    auto dose = VolumeFloat::New();
    dose->Create(ct->get_size(), ct->get_spacing(), ct->get_origin(), 0);


    //calculate_layers(nozzle, ct, lut, { roi }, plan);
    optimize_plan(nozzle, ct, lut, { roi_1, roi_2 }, plan, dose);
}